from fastapi import APIRouter
from ..services.stock_service import get_history_data
from ..models.schemas import StockHistoryResponse

router = APIRouter()

@router.get("/history", response_model=StockHistoryResponse)
async def get_history(stock_code: str, days: int = 30):
    """获取股票历史数据"""
    return await get_history_data(stock_code, days)
